Selecting an operator graph configuration for a stream-based computing application

ABSTRACT

First and second simulated processing of a stream-based computing application using respective first and second simulation conditions may be performed. The first and second simulation conditions may specify first and second operator graph configurations. Each simulated processing may include inputting a stream of test tuples to the stream-based computing application, which may operate on one or more compute nodes. Each compute node may have one or more computer processors and a memory to store one or more processing elements. Each simulated processing may be monitored to determine one or more performance metrics. The first and second simulated processings may be sorted based on a first performance metric to identify a simulated processing having a first rank. An operator graph configuration associated with the simulated processing having the first rank may be selected if the first performance metric for the simulated processing having the first rank is within a processing constraint.

FIELD

This disclosure generally relates to stream computing, and inparticular, to computing applications that receive streaming data andprocess the data as it is received.

BACKGROUND

Database systems are typically configured to separate the process ofstoring data from accessing, manipulating, or using data stored in adatabase. More specifically, database systems use a model in which datais first stored and indexed in a memory before subsequent querying andanalysis. In general, database systems may not be well suited forperforming real-time processing and analyzing streaming data. Inparticular, database systems may be unable to store, index, and analyzelarge amounts of streaming data efficiently or in real time.

SUMMARY

Embodiments are directed to a method, system, and computer programproduct for selecting an operator graph configuration for a stream-basedcomputing application. One embodiment is directed to a method thatincludes performing a first simulated processing of the stream-basedcomputing application using a first simulation condition and performinga second simulated processing of the stream-based computing applicationusing a second simulation condition. The first simulation conditionspecifies a first operator graph configuration. The second simulationcondition specifies a second operator graph configuration and the secondsimulation condition may be distinct from the first simulationcondition. Each simulated processing may include inputting a stream oftest tuples to the stream-based computing application. The stream-basedcomputing application may operate on one or more compute nodes. Eachcompute node may have one or more computer processors and a memory tostore one or more processing elements. Each processing element may haveone or more stream operators. The method may include monitoring eachsimulated processing to determine one or more performance metrics. Inaddition, the method may include sorting the first and second simulatedprocessings based on a first performance metric to identify a simulatedprocessing having a first rank. Further, the method may includeselecting an operator graph configuration associated with the simulatedprocessing having the first rank if the first performance metric for thesimulated processing having the first rank is within a processingconstraint.

In one embodiment, the performance metrics may include a processing timeand the processing constraint may include a processing time constraint.In one embodiment, the method may include performing a third simulatedprocessing of the stream-based computing application using a thirdsimulation condition if the first performance metric for the simulatedprocessing having the first rank is outside of the processingconstraint. The third simulation condition may specify a third operatorgraph configuration and may be distinct from the first and secondsimulation conditions.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a computing infrastructure configured to execute astream-based computing application according to various embodiments.

FIG. 2 illustrates a more detailed view of a compute node of FIG. 1according to various embodiments.

FIG. 3 illustrates a more detailed view of the management system of FIG.1 according to various embodiments.

FIG. 4 illustrates a more detailed view of the compiler system of FIG. 1according to various embodiments.

FIG. 5 illustrates an operator graph for a stream-based computingapplication according to various embodiments.

FIG. 6 illustrates an operator graph for a stream-based computingapplication according to an embodiment.

FIG. 7 illustrates an exemplary portion of an operator graph within acompute node, the portion including stream operators within processingelements.

FIG. 8 illustrates a flow diagram of a method for simulating astream-based computing application according to an embodiment.

FIG. 9 illustrates an exemplary flowchart of a method for selecting anoperator graph configuration for a stream-based computing applicationaccording to various embodiments.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

Stream-based computing and stream-based database computing are emergingas a developing technology for database systems. Products are availablewhich allow users to create applications that process and querystreaming data before it reaches a database file. With this emergingtechnology, users can specify processing logic to apply to inbound datarecords while they are “in flight,” with the results available in a veryshort amount of time, often in fractions of a second. Constructing anapplication using this type of processing has opened up a newprogramming paradigm that will allow for development of a broad varietyof innovative applications, systems, and processes, as well as presentnew challenges for application programmers and database developers.

In a stream-based computing application, stream operators are connectedto one another such that data flows from one stream operator to the next(e.g., over a TCP/IP socket, in-memory database, or shared memory).Scalability is achieved by distributing an application across nodes bycreating executables (i.e., processing elements), as well as replicatingprocessing elements on multiple nodes and load balancing among them.Stream operators in a stream computing application can be fused togetherand placed in a processing element that is executable. Fusing streamoperators in a processing element allows them to share a common processspace, that generally results in faster communication between streamoperators than is available using inter-process communication techniques(e.g., using a TCP/IP socket). Further, processing elements can beinserted or removed dynamically from an operator graph representing theflow of data through the stream computing application.

A “tuple” is data. More specifically, a tuple is a sequence of one ormore attributes associated with an entity. Attributes may be any of avariety of different types, e.g., integer, float, Boolean, string, etc.The attributes may be ordered. A tuple may be extended by adding one ormore additional attributes to it. In addition to attributes associatedwith an entity, a tuple may include metadata, i.e., data about thetuple. As used herein, “stream” or “data stream” refers to a sequence oftuples. Generally, a stream may be considered a pseudo-infinite sequenceof tuples.

Stream computing applications handle massive volumes of data that needto be processed efficiently and in real time. For example, a streamcomputing application may continuously ingest and analyze hundreds ofthousands of messages per second and up to petabytes of data per day.Accordingly, each stream operator in a stream computing application maybe required to process a received tuple within fractions of a second.

In stream-based computing applications, the stream operators andprocessing elements of an operator graph may be distributed acrossmultiple compute nodes as well as within individual compute nodes.Stream operators and processing elements may be connected byinter-stream operator communication paths. An “inter-stream operatorcommunication path,” as used herein, may refer to operations that employa shared memory segment, a pipe, a named pipe (also known as a FIFO), amessage queue, a memory mapped file, an in-memory database, a UNIXdomain or inter-process communication socket, or any other similaroperation. An inter-stream operator communication path, as used herein,may also refer to operations that use a network and employ an internetsocket, such as a TCP/IP socket, a stream socket, a datagram socket, orany other similar operation.

The stream operators and processing elements within a compute node maybe connected by inter-stream operator communication paths, such asoperations that employ a shared memory segment, a pipe, a named pipe, amessage queue, a memory mapped file, a UNIX domain or inter-processcommunication socket, or any other similar operation. Processingelements on distinct compute nodes may be connected by a network havingone or more links and communication operations that employ aninter-network or internet socket, such as a TCP/IP socket, a streamsocket, or a datagram socket, or any other similar operation.

Whether a stream computing application will perform successfully maydepend on whether the network is capable of handling the workload andwhether the inter-stream operator communication paths within the computenodes are capable of handling the workload. Accordingly, determiningwhether the network and the inter-stream operator communication pathswithin compute nodes are capable of handling a variety of workloadsbefore the stream-based computing application is used in a liveproduction environment may be beneficial.

According to various embodiments, an operator graph may be deployed on anetwork, stream operators may be configured to simulate processing, oneor more simulation conditions may be specified, and a particularworkload may be input to the operator graph. While simulated processingof a stream of test tuples is performed, one or more inter-streamoperator communication paths (either on the network, within computenodes, or both) may be monitored to determine one or more performancemetrics. Simulated processing may include simulating differentworkloads, as well as shutting down or turning on parts of the operatorgraph. In addition, simulated processing may also include simulatingactivities initiated by a stream operator that may affect the network.

One example of a performance metric is the latency on a link betweencompute nodes. Where the latency of a link is such that the capacity ofthe entire streaming application is limited, a bottleneck may beidentified. Other examples of a performance metric are the time requiredby a compute node for processing a tuple and the latency of aninter-stream operator communication path within a compute node. Anadditional example of a performance metric is an identification of atopographic feature of an operator graph that affects the performance ofa stream-based computing application. Furthermore, while embodimentsinclude identifying bottlenecks and other types of latency, in otherembodiments, performance metrics may be used to identify locations inthe operator graph with excess bandwidth, excess processing capacity,that are uncongested, or that have relatively low latency.

According to various embodiments, the performance of the stream-basedcomputing application during the simulated processing may be monitoredto determine one or more performance metrics with respect to how aninter-stream operator communication path, compute node, or otherresource affects application performance. In addition the simulatedprocessing may be monitored to determine a performance metric thatidentifies locations in the operator graph with excess bandwidth, excessprocessing capacity, that are uncongested, or that have relatively lowlatency.

Simulated processing may include simulating processing using a firstsimulation condition and then repeating the simulation using a differentsimulation condition with a different value for a parameter, accordingto various embodiments. In other words, a baseline simulation may beperformed and one or more additional simulations may be performed forcomparison with the baseline simulation. Generally, parameters that maybe varied in multiple simulations may relate to either work load placedon the operator graph or to aspects of the operator graph itself. In theformer category, one example of a parameter that may be varied inmultiple simulations is the rate at which test tuples are supplied to astream-based application, e.g., at first, second, and third rates, wherethe input rates may be relatively low, average, and relatively highrates, respectively. Another example of a parameter that may be variedin multiple simulations is the size (e.g., number of bytes) of testtuples supplied to a stream-based application, e.g., in first, second,and third sizes, where the sizes may be relatively small, average, andrelatively large sizes, respectively. Yet another example of parametersthat may be varied in multiple simulations are the attributes of testtuples supplied to a stream-based application, e.g., in first, second,and third attribute configurations, where the attribute configurationsmay require relatively small, average, and relatively large processingtimes by a stream operator, respectively. A further example of aparameter that may be varied in multiple simulations is a quantity ofother, i.e., non-tuple, traffic on a network coupling compute nodes. Forexample, the quantity of “other traffic” on a network shared by astreaming application with another application may be nil, moderate, orheavy.

Parameters that may be varied in multiple simulations may also relate tothe operator graph rather than the workload. One example of a parameterof this type that may be varied in multiple simulations is the operatorgraph configuration, i.e., parts of the operator graph may be turned offor turned on. For example, a stream operator, a processing element, acompute node, or a branch of an operator graph may be turned on in abaseline simulation and turned off in a subsequent simulation. Anadditional example of a parameter that may be varied in multiplesimulations is configuring a stream operator or processing element toperform or not perform operations that may affect the network. Forexample, a processing element may be configured to open a TCP/IP socketand initiate a non-tuple communication. Further examples of parametersthat may be varied in multiple simulations are stream operator behaviorsthat affect the performance of a stream-based computing application.This type of behavior may include tuple sorting and routing criteriaused by a stream operator as well as the number of tuples that areoutput by a stream operator in response to receiving an input tuple. Inaddition, this type of behavior may include the size (e.g., number ofbytes) of tuples output by a stream operator.

Two or more simulations may be performed in which a particular parameteris varied while all other parameters are held constant, in variousembodiments. Each time simulated processing is repeated using adifferent value of the particular parameter, the stream-based computingapplication may be monitored to determine one or more performancemetrics. Accordingly, each iteration of simulated processing yieldsperformance metrics. The performance metrics may be compared to athreshold or other reference to determine if a particular parameterresults in acceptable or unacceptable performance. For example, assumethe parameter that is varied is the rate at which test tuples aresupplied to a stream-based application. A metric value for a parametervalue corresponding with a relatively low rate may indicate acceptableperformance, while the metric value for a parameter value correspondingwith a relatively high rate may indicate unacceptable performance.

Simulations may be performed in which first and second parameters arevaried while all remaining parameters are held constant, according tovarious embodiments. In first simulations, two or more simulations maybe performed in which the first parameter is varied while all remainingparameters are held constant. In the first simulations, the secondparameter is set to an initial value and held at that value for all ofthe simulations. In second simulations, two or more simulations may beperformed in which the second parameter is set to a second value and thefirst parameter is varied while all remaining parameters are heldconstant. As an example, first simulations may be performed in which therate at which test tuples are supplied to a stream-based application isvaried. In the first simulations, all branches of an operator graph maybe active or on, while all remaining parameters are held constant.Thereafter, second simulations may be performed in which a branch of theoperator graph is turned off and the rate at which test tuples aresupplied to a stream-based application is varied. In the secondsimulations, all remaining parameters are held constant.

Various embodiments are directed to performing a first simulatedprocessing of the stream-based computing application using a firstsimulation condition and performing a second simulated processing of thestream-based computing application using a second simulation condition.The first simulation condition specifies a first operator graphconfiguration. The second simulation condition specifies a secondoperator graph configuration and the second simulation condition may bedistinct from the first simulation condition. Each simulated processingis monitored to determine one or more performance metrics. In addition,the first and second simulated processings may be sorted based on afirst performance metric to identify a simulated processing having afirst rank. An operator graph configuration associated with thesimulated processing having the first rank may be selected if the firstperformance metric for the simulated processing having the first rank iswithin a processing constraint.

FIG. 1 illustrates one exemplary computing infrastructure 100 that maybe configured to execute a stream-based computing application, accordingto some embodiments. The computing infrastructure 100 includes amanagement system 105 and two or more compute nodes 110A-110D—i.e.,hosts—which are communicatively coupled to each other using one or morecommunications networks 120. A compiler system 102 may becommunicatively coupled with the management system 105 and the computenodes 110 either directly or via the communications network 120.

The one or more communications networks 120 may include one or moreservers, networks, or databases, and may use a particular communicationprotocol to transfer data between the compute nodes 110A-110D. Thecommunications network 120 may include a variety of types of physicalcommunication channels or “links.” The links may be wired, wireless,optical, or any other suitable media. In addition, the communicationsnetwork 120 may include a variety of network hardware and software forperforming routing, switching, and other functions, such as routers,switches, or bridges. The communications network 120 may be dedicatedfor use by a streaming application or shared with other applications andusers. The communications network 120 may be any size. For example, thecommunications network 120 may include a single local area network or awide area network spanning a large geographical area, such as theInternet. The links may provide different levels of bandwidth orcapacity to transfer data at a particular rate. The bandwidth that aparticular link provides may vary depending on a variety of factors,including the type of communication media and whether particular networkhardware or software is functioning correctly or at full capacity. Inaddition, the bandwidth that a particular link provides to a streamingapplication may vary if the link is shared with other applications andusers. The available bandwidth may vary depending on the load placed onthe link by the other applications and users. The bandwidth that aparticular link provides may also vary depending on a temporal factor,such as time of day, day of week, day of month, or season.

FIG. 2 is a more detailed view of a compute node 110, which may be thesame as one of the compute nodes 110A-110D of FIG. 1, according tovarious embodiments. The compute node 110 may include, withoutlimitation, one or more processors (CPUs) 205, a network interface 215,an interconnect 220, a memory 225, and a storage 230. The compute node110 may also include an I/O device interface 210 used to connect I/Odevices 212, e.g., keyboard, display, and mouse devices, to the computenode 110.

Each CPU 205 retrieves and executes programming instructions stored inthe memory 225 or storage 230. Similarly, the CPU 205 stores andretrieves application data residing in the memory 225. The interconnect220 is used to transmit programming instructions and application databetween each CPU 205, I/O device interface 210, storage 230, networkinterface 215, and memory 225. The interconnect 220 may be one or morebusses. Alternatively, the interconnect 220 may be a crossbar switch, abanyan switch, an omega switch, or other switching fabric in variousembodiments. The CPUs 205 may be a single CPU, multiple CPUs, or asingle CPU having multiple processing cores in various embodiments. Inone embodiment, a processor 205 may be a digital signal processor (DSP).One or more processing elements 235 (described below) may be stored inthe memory 225. A processing element 235 may include one or more streamoperators 240 (described below). In one embodiment, a processing element235 is assigned to be executed by only one CPU 205, although in otherembodiments the stream operators 240 of a processing element 235 mayinclude one or more threads that are executed on two or more CPUs 205.The memory 225 is generally included to be representative of a randomaccess memory, e.g., Static Random Access Memory (SRAM), Dynamic RandomAccess Memory (DRAM), or Flash. The storage 230 is generally included tobe representative of a non-volatile memory, such as a hard disk drive,solid state device (SSD), or removable memory cards, optical storage,flash memory devices, network attached storage (NAS), or connections tostorage area network (SAN) devices, or other devices that may storenon-volatile data. The network interface 215 is configured to transmitdata via the communications network 120.

A streams application may include one or more stream operators 240 thatmay be compiled into a “processing element” container 235. The memory225 may include one or more processing elements 235, each processingelement having one or more stream operators 240. Each stream operator240 may include a portion of code that processes tuples flowing into aprocessing element and outputs tuples to other stream operators 240 inthe same processing element, in other processing elements, or in boththe same and other processing elements. Processing elements 235 may passtuples to other processing elements that are on the same compute node110 or on other compute nodes that are accessible via communicationsnetwork 120. For example, a processing element on compute node 110A mayoutput tuples to a processing element on compute node 110B via thenetwork 120. As additional examples, a first processing element oncompute node 110A may output tuples to a second processing element alsoon compute node 110A via a shared memory segment in the memory 225 orinterconnect 220. In addition, each stream operator 240 may includeoperator metadata. Operator metadata may configure, customize, orspecify options for a stream operator.

The storage 230 may include a buffer 260. Although shown as being instorage, the buffer 260 may be located in the memory 225 of the computenode 110 or in a combination of both memories. Moreover, storage 230 mayinclude storage space that is external to the compute node 110, such asin a cloud.

Tuples may arrive at a processing element or stream operator faster thanprocessing can be performed. In this case, arriving tuples may betemporarily stored in an input queue, such as in buffer 260, until theprocessing element or stream operator is available to process thebuffered tuples. Similarly, output tuples may be produced by aprocessing element or stream operator faster than they can betransmitted via an inter-stream operator communication path, such as alink. In this case, output tuples may be temporarily stored in an outputqueue, such as in buffer 260, until the inter-stream operatorcommunication path is available to transmit the buffered tuples.

FIG. 3 is a more detailed view of the management system 105 of FIG. 1according to some embodiments. The management system 105 may include,without limitation, one or more processors (CPUs) 305, a networkinterface 315, an interconnect 320, a memory 325, and a storage 330. Themanagement system 105 may also include an I/O device interface 310connecting I/O devices 312, e.g., keyboard, display, and mouse devices,to the management system 105.

Each CPU 305 retrieves and executes programming instructions stored inthe memory 325 or storage 330. Similarly, each CPU 305 stores andretrieves application data residing in the memory 325 or storage 330.The interconnect 320 is used to move data, such as programminginstructions and application data, between the CPU 305, I/O deviceinterface 310, storage unit 330, network interface 305, and memory 325.The interconnect 320 may be one or more busses. The CPUs 305 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 305 may bea DSP. Memory 325 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 330 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or the cloud. Thenetwork interface 315 is configured to transmit data via thecommunications network 120.

The memory 325 may store a stream manager 134. Additionally, the storage330 may store an operator graph 335. The operator graph 335 may definehow tuples are routed to processing elements 235 (FIG. 2) forprocessing. In addition, the stream manager 134 may store an applicationverifier 340. The application verifier 340 may examine the operatorgraph 335 to determine where one or more bottlenecks may occur and underwhat conditions a bottleneck may occur. A bottleneck may be a locationthat limits the capacity of an entire streaming application. Abottleneck may occur on inter-stream operator communication path. Abottleneck may occur on a single link or in a region (two or more links)of the operator graph 132. A bottleneck may occur within a compute node,such as a bottleneck that occurs in connection with use of sharedmemory. A bottleneck may be in a location where available bandwidth issubstantially slower than other similar locations, e.g., other similarlinks or regions of the operator graph 132. In addition, a bottleneckmay be a link, region, or other location where the volume of data beingtransferred is substantially greater than the volume of data transferredon other similar links, regions, or locations. Further, the applicationverifier 340 may identify topographic features that affect theperformance of a stream-based computing application. The applicationverifier 340 may help a user understand whether the infrastructure of aparticular network is capable of handling a particular workload within arequired time period. The application verifier 340 may help a userunderstand how to eliminate network problems, such as congestion andbottle necks, up front before a streaming application is deployed in aproduction environment.

FIG. 4 is a more detailed view of the compiler system 102 of FIG. 1according to some embodiments. The compiler system 102 may include,without limitation, one or more processors (CPUs) 405, a networkinterface 415, an interconnect 420, a memory 425, and storage 430. Thecompiler system 102 may also include an I/O device interface 410connecting I/O devices 412, e.g., keyboard, display, and mouse devices,to the compiler system 102.

Each CPU 405 retrieves and executes programming instructions stored inthe memory 425 or storage 430. Similarly, each CPU 405 stores andretrieves application data residing in the memory 425 or storage 430.The interconnect 420 is used to move data, such as programminginstructions and application data, between the CPU 405, I/O deviceinterface 410, storage unit 430, network interface 415, and memory 425.The interconnect 420 may be one or more busses. The CPUs 405 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 405 may bea DSP. Memory 425 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 430 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or to the cloud. Thenetwork interface 415 is configured to transmit data via thecommunications network 120.

The memory 425 may store a compiler 136. The compiler 136 compilesmodules, which include source code or statements, into the object code,which includes machine instructions that execute on a processor. In oneembodiment, the compiler 136 may translate the modules into anintermediate form before translating the intermediate form into objectcode. The compiler 136 may output a set of deployable artifacts that mayinclude a set of processing elements and an application descriptionlanguage file (ADL file), which is a configuration file that describesthe streaming application. In some embodiments, the compiler 136 may bea just-intime compiler that executes as part of an interpreter. In otherembodiments, the compiler 136 may be an optimizing compiler. In variousembodiments, the compiler 136 may perform peephole optimizations, localoptimizations, loop optimizations, inter-procedural or whole-programoptimizations, machine code optimizations, or any other optimizationsthat reduce the amount of time required to execute the object code, toreduce the amount of memory required to execute the object code, orboth.

The compiler 136 may also provide the application administrator with theability to optimize performance through profile-driven fusionoptimization. Fusing operators may improve performance by reducing thenumber of calls to a transport. While fusing stream operators mayprovide faster communication between operators than is available usinginter-process communication techniques, any decision to fuse operatorsrequires balancing the benefits of distributing processing acrossmultiple compute nodes with the benefit of faster inter-operatorcommunications. The compiler 136 may automate the fusion process todetermine how to best fuse the operators to be hosted by one or moreprocessing elements, while respecting user-specified constraints. Thismay be a two-step process, including compiling the application in aprofiling mode and running the application, then re-compiling and usingthe optimizer during this subsequent compilation. The end result may,however, be a compiler-supplied deployable application with an optimizedapplication configuration.

FIG. 5 illustrates an exemplary operator graph 500 for a streamcomputing application beginning from one or more sources 135 through toone or more sinks 504, 506, according to some embodiments. This flowfrom source to sink may also be generally referred to herein as anexecution path. Although FIG. 5 is abstracted to show connectedprocessing elements PE1-PE10, the operator graph 500 may include dataflows between stream operators 240 (FIG. 2) within the same or differentprocessing elements. Typically, processing elements, such as processingelement 235 (FIG. 2), receive tuples from the stream as well as outputtuples into the stream (except for a sink—where the stream terminates,or a source—where the stream begins).

The example operator graph shown in FIG. 5 includes ten processingelements (labeled as PE1-PE10) running on the compute nodes 110A-110D.Tuples may be transmitted between the compute nodes 110A-110D via linksL1-L4. While the links L1 and L2 are shown as distinct links, in oneembodiment the connections represented by links L1 and L2 may beimplemented with a single link used for portions of the execution pathconnecting PE2 to PE4 and PE3 to PE5. A processing element may includeone or more stream operators fused together to form an independentlyrunning process with its own process ID (PID) and memory space. In caseswhere two (or more) processing elements are running independently,inter-process communication may occur using an inter-stream operatorcommunication path (a “transport”), e.g., a network socket, a TCP/IPsocket, a shared memory segment, a pipe, a named pipe, a message queue,a memory mapped file, a UNIX domain or inter-process communicationsocket, or any other similar operation. However, when stream operatorsare fused together, the fused stream operators may use communicationtechniques for passing tuples among themselves within the processingelement that may be faster than inter-stream operator communicationpaths.

The operator graph 500 begins at a source 135 and ends at a sink 504,506. Compute node 110A includes the processing elements PE1, PE2, andPE3. Source 135 flows into the processing element PE1, which in turnoutputs tuples that are received by PE2 and PE3. For example, PE1 maysplit data attributes received in a tuple and pass some data attributesin a new tuple to PE2, while passing other data attributes in anothernew tuple to PE3. As a second example, PE1 may pass some received tuplesto PE2 while passing other tuples to PE3. Data that flows to PE2 isprocessed by the stream operators contained in PE2, and the resultingtuples are then output via link L1 to PE4 on compute node 110B.Likewise, the tuples output by PE4 flow to operator sink PE6 504.Similarly, tuples flowing from PE3 to PE5 via link L2 also reach theoperators in sink PE6 504. Thus, in addition to being a sink for thisexample operator graph, PE6 could be configured to perform a joinoperation, combining tuples received from PE4 and PE5. This exampleoperator graph also shows tuples flowing from PE3 to PE7 on compute node110C via link L3, which itself shows tuples flowing to PE8 and loopingback to PE7. Tuples output from PE8 may flow to PE9 on compute node 110Dvia link L4, which in turn outputs tuples to be processed by operatorsin a sink processing element, for example PE10 506.

The tuple received by a particular processing element 235 (FIG. 2) isgenerally not considered to be the same tuple that is output downstream.Typically, the output tuple is changed in some way. An attribute ormetadata may be added, deleted, or changed. However, it is not requiredthat the output tuple be changed in some way. Generally, a particulartuple output by a processing element may not be considered to be thesame tuple as a corresponding input tuple even if the input tuple is notchanged by the processing element. However, to simplify the presentdescription and the claims, an output tuple that has the same dataattributes as a corresponding input tuple may be referred to herein asthe same tuple.

Processing elements 235 (FIG. 2) may be configured to receive or outputtuples in various formats, e.g., the processing elements or streamoperators could exchange data marked up as XML documents. Furthermore,each stream operator 240 within a processing element 235 may beconfigured to carry out any form of data processing functions onreceived tuples, including, for example, writing to database tables orperforming other database operations such as data joins, splits, reads,etc., as well as performing other data analytic functions or operations.

The stream manager 134 of FIG. 1 may be configured to monitor a streamcomputing application running on compute nodes, e.g., compute nodes110A-110D, as well as to change the deployment of an operator graph,e.g., operator graph 132. The stream manager 134 may move processingelements from one compute node 110 to another, for example, to managethe processing loads of the compute nodes 110A-110D in the computinginfrastructure 100. Further, stream manager 134 may control the streamcomputing application by inserting, removing, fusing, un-fusing, orotherwise modifying the processing elements and stream operators (orwhat tuples flow to the processing elements) running on the computenodes 110A-110D. One example of a stream computing application isInfoSphere® Streams available from IBM® (note that InfoSphere® is atrademark of International Business Machines Corporation, registered inmany jurisdictions worldwide).

Because a processing element may be a collection of fused streamoperators, it is equally correct to describe the operator graph as oneor more execution paths between specific stream operators, which mayinclude execution paths to different stream operators within the sameprocessing element. FIGS. 5 and 6 illustrate execution paths betweenprocessing elements for the sake of clarity.

FIG. 6 illustrates an exemplary operator graph 600 for a streamcomputing application, beginning from one or more sources 602 andcontinuing through to one or more sinks 602. The operator graph 600includes compute nodes 110E-110I. The compute node 110E includes theprocessing elements PE11, PE12, PE13, and PE14. The compute node 110Fincludes the processing elements PE15 and PE16. The compute node 110Gincludes the processing elements PE17 and PE18. The compute node 110Hincludes the processing elements PE19 and PE20. The compute node 110Iincludes the processing elements PE21, PE22, PE23, and PE34.

Processing elements on compute node 110E communicate tuples toprocessing elements on compute nodes 110F, 110G, and 110H, respectively,via links L5, L6 and L7. Processing elements on compute nodes 110F,110G, and 110H communicate tuples to processing elements on compute node110I, respectively, via links L8, L9 and L10.

FIG. 7 illustrates an exemplary portion of an operator graph within acompute node, the portion including stream operators within processingelements. In FIG. 7, the processing elements PE19 and PE20 on computenode 110H of FIG. 6 are shown in more detail. In this example, theprocessing element PE19 includes stream operators SO1, SO2, SO3, andSO4. In addition, the processing element PE20 includes stream operatorsSO5, SO6, and SO7. The stream operators SO4 and SO5 communicate viainter-stream operator communication path P1.

Simulations may be conducted to determine whether any of the linksL5-L10 are bottlenecks. In addition, simulations may be conducted todetermine whether any of the inter-stream operator communication paths,e.g., P1 in FIG. 7, are bottlenecks. Further, simulations may identifynodes with insufficient processing resources to handle the workloadwithin required time periods. Simulations may be conducted to test avariety of different operator graph configurations and a variety ofdifferent scenarios.

In one embodiment, simulations may be conducted using different routingor sorting criteria. For example, PE11 may split a received streamaccording to a sorting criterion. For instance, PE11 may route tuplesaccording to the alphabetical value of a particular attribute, such thattuples having a particular attribute that begins with: (a) a-h arerouted to PE12; (b) i-o are routed to PE13; and (c) p-z are routed toPE14. A first simulation may be conducted with tuples being routed byPE11 according to this criterion. The routing criterion of PE11 may bemodified and a second simulation conducted with the test stream beingrouted by PE11 according to the modified criterion. For example, thePE11 routing criteria may be modified so that tuples having a particularattribute that begins with: (a) a-e are routed to PE12; (b) f-m arerouted to PE13; and (c) n-z are routed to PE14. Routing criteria may bemodified at one or more processing elements. In one embodiment,simulations are conducted using two or more different routing criteria.By conducting simulations using various routing criteria, a bottleneckthat occurs when using particular routing criteria may be identified.

In one embodiment, simulations may be conducted using differentworkloads. Workloads may vary by data rate or by composition of the testdata. For example, first, second, and third simulations may be conductedwith tuples being supplied by or at source 602 at first, second, andthird rates. As one example, the first and second rates may berelatively low and average rates, respectively, and the third rate maybe a relatively high or peak rate. As another example of varying theworkload, simulations may be conducted in which the composition of aparticular attribute in the test data stream is varied. For example,tuples may be routed by PE11 based on the value of a particularattribute, such that tuples with the particular attribute that beginswith: (a) a-h are routed to PE12; (b) i-o are routed to PE13; and (c)p-z are routed to PE14. In a first simulation, the composition of thetest data stream is such that the numbers of input tuples in categoriesa-h, i-o, and p-z are substantially equal. In a second simulation, thecomposition of the test data stream is such that the numbers of tuplesin the categories a-h, i-o, and p-z respectively correspond with 50%,35%, and 15% of the input. By conducting simulations using differentworkloads, a bottleneck that occurs under a particular workload may beidentified.

Simulations may be conducted with parts of an operator graph turned onor off (activating or deactivating). A link (or other inter-streamoperator communication path), a compute node, a processing element, orstream operator may be activated or deactivated. Turning off ordeactivating a compute node or a link may be used to simulate a hardwarefailure. Turning on or activating a compute node or a link may be usedto simulate adding resources to an operator graph to determine whetherthe additional resources are sufficient to eliminate a bottleneck. Forexample, a first simulation of the operator graph 600 may be performed.After performing the first simulation using the entire operator graph600, the compute node 110H may be turned off or, alternatively, the linkL7 may be turned off and a second simulation performed. In this example,PE12 and PE14 recognize that PE19 on compute node 110H is unavailable toreceive tuples. PE12 and PE14 may be configured to route the tuples thateach would have sent to compute node 110H to another compute node. Inthis example, PE12 may be configured to route tuples that it would havesent to PE19 to PE17 or PE15 if compute node 110H is unavailable.Similarly, PE14 may be configured to route tuples that it would havesent to PE19 to PE17 or PE15 if compute node 110H is unavailable. In thesecond simulation when the compute node 110H is unavailable or inactive,one or more of links L5, L6, L8, or L9 may become bottlenecks. Byconducting simulations with parts of the operator graph 600 turned off,a bottleneck that occurs when part of the operator graph is turned offmay be identified.

As a second example, a first simulation of an operator graph may beperformed. In this example, the operator graph that is simulated is amodified version of the operator graph 600 shown in FIG. 6. The modifiedoperator graph in this example includes the compute nodes 110E, 110F,110H, and 110I, but not compute node 110G. The first or baselinesimulation of the modified operator graph may indicate that one or moreof links L5, L7, L8, or L10 is a bottleneck. After performing the firstsimulation using the modified operator graph, the compute node 110G maybe turned on (activated or otherwise made available to receive tuples)and a second simulation performed. In this example, after the computenode 110G is turned on, PE12 and PE13 recognize that PE17 on computenode 110G is available to receive tuples. PE12 and PE13 may beconfigured to begin routing tuples that would have been sent elsewhereto compute node 110G. The second simulation may show that a linkidentified as a bottleneck in the first simulation is no longer abottleneck or that it remains a bottleneck. By conducting simulationswith one or more additional compute nodes added to the modified operatorgraph, it may be determined whether a bottleneck that occurs in themodified operator graph will be eliminated be the additional computenodes.

In one embodiment, a simulation directed to determining a performancemetric with a part of an operator graph turned on or off may involveturning processing elements or stream operators within a compute node onor off. In a first example, a compute node may have a single core andprocessing elements passing tuples using a shared memory region.Simulations may be conducted with one or more of the processing elementsturned on or off. In a second example, a compute node may have two ormore cores and one or more processing elements running on each core.Tuples may be passed between processing elements running on differentcores using a memory shared by the two or more cores, or by a bus usedfor communication among the cores. Simulations may be conducted with oneor more of the processing elements running on the same or differentcores turned on or off. In a third example, a compute node may have twoor more chips, each chip having two or more cores. For example, acompute node may include eight chips, each chip having eight cores. Oneor more processing elements may be running on each of the 64 cores. Inthis example, the processing elements in this example may pass tuplesusing a single bus, shared memory, a crossbar switch, a banyan switch,an omega switch, or other switching fabric. Simulations may be conductedwith one or more of the processing elements running on the same ordifferent cores turned on or off.

In one embodiment, simulations may be conducted of stream operator orprocessing element behavior that affects network performance. This typeof behavior may include an operator or processing element that is unableto keep up with workload demands as well as an operator or processingelement that initiates network traffic in addition to traffic associatedwith transmitting tuples. In one embodiment, simulations may beconducted in which a stream operator or processing element uses varioussorting criteria. For example, PE12 may employ first and second sortingcriteria in two simulations. In a first simulation, PE12 may sort tuplesso that 20% of the tuples it outputs are sent to PE15. In a secondsimulation, PE12 may sort tuples so that 50% of the tuples it outputsare sent to PE15. The second simulation increases processingrequirements on PE15 and node 110F. This increase in required processingmay in turn cause tuples that PE15 receives from PE12 to form anexcessive queue, e.g., a queue that exceeds some threshold for apredetermined period of time, at an input port to PE15. Alternatively,this increase in required processing may in turn cause PE12 to shed,i.e., discard without processing, some of the tuples that it receivesfrom PE15. While an excessive queue at PE15 in this example is not aresult of insufficient bandwidth on link L5, the excessive queue mayaffect the overall performance of the operator graph 600 in the samemanner as a bottleneck. Similarly, load shedding at PE15 may affectoverall performance of the application. By conducting simulations inwhich a stream operator or processing element uses various sortingcriteria, it may be determined whether the use of particular sortingcriteria causes a stream operator workload to increase beyond theoperator's capacity to process tuples in a timely manner.

In one alternative embodiment, simulations may be conducted in which astream operator or processing element performs an operation that mayaffect the network. For example, a simulation may be performed in whichPE18 is configured to open a network socket and initiate a networkcommunication on link L9 in response to a condition. This networkcommunication by PE18 may be with an entity that is not part of theoperator graph 600. Alternatively, it may be a network communicationwith a compute node that is part of the operator graph 600, but thecommunication is unrelated to the stream-based computing application. Ineither case, the communication is a non-tuple or an “extra stream-basedcomputing application communication.” In this example, this networkcommunication uses part of the bandwidth available on link L9 that wouldotherwise be available for transmitting tuples. Depending on thefrequency and size of these extra-stream communications, a bottleneckmay occur on link L9. In various embodiments, simulations are performedin which a processing element or stream operator opens a network socketand initiates a network communication. The simulations may includevarying the condition that triggers the communication or the size of thenetwork communication.

FIG. 8 illustrates an exemplary flowchart of a method 800 for simulatinga stream-based computing application according to various embodiments.While the figure depicts particular operations as being performedsequentially, it should be understood that various operations may beperformed simultaneously or in other sequences. The method 800 may beginwith operation 801, from which it proceeds to operation 802. Inoperation 802, a compiler, e.g., compiler 136, may compile one or moreprocessing elements, e.g., processing element 235. The compiler 136 mayoutput a configuration for the streaming application, which may includeassigning one or more processing elements 235 to one or more computenodes, e.g., compute node 110. The output of the compiler 136 mayinclude an operator graph 132.

In operation 803, a processing time constraint may be specified.Generally, stream-based applications must process data in real time. Inoperation 803, a user may specify a particular minimum amount of time inwhich tuples must be processed. For example, a user may specify thateach tuple in a data stream must be processed in no more than onemillisecond or no more than 100 microseconds. The time constraint willvary depending on the application. The processing time constraint may beexpressed in terms of path or operator graph travel times, which arefurther described below.

In operation 804, conditions for a particular simulation may bespecified. The conditions that may be specified in operation 804 areconditions that relate to the operation of particular elements of theoperator graph. Operation 804 may include specifying: (1) the manner inwhich stream operators and processing elements simulate processing; (2)whether particular parts (stream operators, processing elements, computenodes, and links) of the operator graph are on or off during simulatedprocessing, and (3) other pertinent parameters that relate to functionalaspects of an operator graph. The manner in which stream operators andprocessing elements simulate processing may include: (a) whether astream operator or processing element performs operations that mayaffect a network, e.g., opening a network socket; (b) conditions forsorting or routing tuples at a stream operator or processing element;(c) the size and number of tuples output by a stream operator orprocessing element in response to receiving an input tuple; (d) how astream operator or processing element simulates processing, e.g.,processing times, retransmission timer values; (e) conditions underwhich a stream operator or processing element sheds tuples; and (f)whether and how a stream operator or processing element groups tuplesfor transmission.

Specifying a simulation condition for a particular simulation mayspecify a particular operator graph configuration. For example, asimulation condition that part of an operator graph is to be off duringsimulated processing specifies a particular operator graphconfiguration. As another example, a simulation condition that a streamoperator is to sort or route tuples according to a specified criteria atduring simulated processing specifies a particular operator graphconfiguration.

Operation 804 may include specifying operator metadata. Operatormetadata configures stream operators. By specifying operator metadata,the manner in which stream operators and processing elements simulateprocessing may be specified. In various embodiments, operator metadatamay be specified to configure a stream operator to not process thetuples it receives, but instead to simulate processing. Operation 804may include setting parameters or metadata that specify how processingis to be simulated. For example, a stream operator may be configured tooutput a particular number of tuples for every tuple received. Asanother example, a stream operator may be configured to output one ormore tuples following receiving an input tuple after a particular timedelay. For example, a processing element or stream operator may receivea tuple, hold the tuple for 5 ms, and then transmit a correspondingtuple to another stream operator without performing any processing. Astream operator may be configured to set a particular attribute value ofa received tuple to a default value. A stream operator that sortstuples, routing input tuples to one of two or more other streamoperators according to a condition, may have the sorting conditionspecified in operation 804. A stream operator that transmits tuples onlink may be configured to group and send two or more tuples as a groupin a single transmission rather than transmitting each tupleindividually. A stream operator that includes a timer, such as aretransmission timer, may have its time limit set in operation 804.Operation 804 may include specifying metadata for simulating any type ofoperation a stream operator may perform. In addition, operation 804 mayinclude specifying that a stream operator perform only limitedprocessing of tuples. In various embodiments, the application verifier340, the compiler 136, or any other suitable component may set streamoperator parameters or metadata.

Operation 804 may additionally include specifying operator metadata thatconfigures a stream operator or processing element to behave in a waythat affects network performance, i.e. to engage in extra stream-basedcomputing application communications. In particular, a stream operatorthat opens a network socket and initiates a network transmission orreception or both following the receipt of a tuple or according toanother condition may have the condition specified in operation 804.

In operation 805, additional conditions for a particular simulation maybe specified. The conditions that may be specified in operation 805 areconditions that relate to workload placed on an operator graph.Operation 804 may include specifying: (a) the rate at which test tuplesare input to the stream-based application; (b) the attributes of thetest tuples, e.g., attributes that require different amounts ofprocessing resources; (c) the size of test tuples; (d) the level ofnetwork traffic on a unrelated to a stream-based computing application;(e) the amount of processing resources on various compute nodes consumedby applications other than a stream-based computing application; and (f)other pertinent parameters that relate to the workload placed on anoperator graph.

In operation 806, a stream-based computing application may be simulated.The operation 806 may include the stream manager 134, source 135, source602, or other suitable source inputting a stream of test tuples into theoperator graph. Alternatively, test data may be input at any point inthe operator graph. The test data may be data, e.g., a stream of tuplesthat facilitates simulation of a stream-based computing application in away that isolates network effects. In one embodiment, the test data mayinclude a tuple with attribute values that cause the processing elementor stream operator to omit processing of the tuple. For example, aparticular attribute of a tuple may be all nines or all zeros. Inanother embodiment, the test data may also contain a runtime flag toindicate that the processing element or stream operator may omitprocessing of the tuple. In yet another embodiment, metadata for thestream operators are specified so that the operators are configured totreat all tuples received as test data without regard to data value. Ingeneral, test tuples may be sized to simulate actual or predictednetwork or bus traffic. For example, if tuples transmitted on aparticular link are expected to be 64 bytes, test tuples transmitted onthis link during simulation may be 64 bytes.

In operation 806, a test tuple may be “passed through” a stream operatoror processing element, meaning that the test tuple is not processed oronly limited processing is performed on the test tuple. As mentioned,operator metadata may be specified in operation 804 to configure astream operator to not process the tuples it receives or to configure anoperator to perform limited processing.

In operation 806, stream operators and processing elements may simulatethe processing of tuples. For example, in FIG. 5, PE1 may transmittuples to PE2 and PE3. If the tuples received by PE1 are 128 bits butPE2 expects PE1 to output tuples that are 256 bits, then PE1 may add 128bits to the test tuples it outputs to simulate processing prior totransmitting to PE2. In other embodiments, bits may be subtracted tosimulate processing. In some embodiments, the stream manager 134 maysimulate the processing of a test tuple, while in other embodiments astream operator or processing element may simulate the processing of atest tuple.

In operation 808, a stream-based computing application may be monitored.Operation 808 may be performed while test tuples are flowing through anoperator graph, i.e., concurrently with operation 806. In operation 808,the stream manager 134 or application verifier 340 may monitor theinter-stream operator communication paths for bottlenecks or any othermetric that affects network or application performance. Stream operatorsor processing elements may report various metrics to the stream manager134 or application verifier 340. In addition, various metrics may bereported by the stream manager 134, application verifier 340, or by anoperating system. Metrics reported by the stream manager 134 orapplication verifier 340 may include the number of tuples queued atinput or output ports of a particular processing element or streamoperator, processing element or operator throughput, or link health andbehavior. Metrics reported by the operating system may include, but arenot limited to, a network load, link utilization, hop count, path speed,packet loss, link availability, latency, path reliability, pathbandwidth, or throughput.

Processing elements or stream operators may periodically send monitoringdata to the stream manager 134 or application verifier 340. For example,a test tuple may include an identifier so that a first processingelement may notify the stream manager 134 that a particular test tuplewas output at a first time and a second processing element may notifythe stream manager 134 or application verifier 340 that the test tuplewas received at a second time. This monitoring data from the first andsecond processing elements may be used by the stream manager 134 todetermine how long the particular test tuple took to travel from thefirst processing element to the second processing element, i.e., pathtravel time. In an alternative embodiment, a time stamp may be added toa particular test tuple at a first processing element and a secondprocessing element that receives the tuple may inspect the time stamp todetermine travel time. In this alternative, the stream manager 134 orapplication verifier 340 may periodically poll the second processingelements to determine path travel time. In these embodiments, the firstand second processing elements or stream operators may be directlycoupled by an inter-stream operator communication path or link,indirectly coupled via two or more inter-stream operator communicationpaths or links or via one or more processing elements, or via bothplural inter-stream operator communication paths or links and processingelements. In one embodiment, path travel time may be an average. Forexample, the times taken for one million tuples to travel a particularpath may be averaged to produce an average path travel time. Inaddition, the path travel times for all paths in an operator graph maybe combined to generate an operator graph travel time.

Operation 808 may include determining where a bottleneck or othercongestion occurs in the operator graph 500. This determination may beperformed by the stream manager 134 or application verifier 340. Inparticular, the operation 808 may include inspecting stream operators orprocessing elements that have either an input or output port coupledwith an inter-stream operator communication path, such as a link, e.g.,PE23 and PE20 with respect to link L10. In addition, it may includeinspecting stream operators or processing elements that do not have aninput or output port coupled with a link, e.g., an input port of PE16.Further, it may include inspecting stream operators within a processingelement, e.g., stream operator SO6 within processing element PE20 (FIG.7). An inter-stream operator communication path may be identified as abottleneck if the stream operator or processing element has an input oroutput queue of tuples that is outside a threshold, e.g., greater orless than a threshold. In one embodiment, the inter-stream operatorcommunication path may be identified as a bottleneck if the queue oftuples exceeds the threshold for a particular period of time, e.g. 20ms. In one alternative, the inter-stream operator communication path maybe identified as a bottleneck if the queue of tuples exceeds thethreshold a particular number of times during a specified time period,e.g. five times in a 500 ms period. A stream operator or processingelement may be configured to shed or discard tuples if it is unable toprocess received tuples in a timely manner. In one embodiment, aninter-stream operator communication path, such as a link, feeding tuplesto a stream operator or processing element may be identified as abottleneck if the operator or processing element is sheds or discardstuples. The link may be identified as a bottleneck if the number oftuples shed exceeds a threshold or if the operator or processing elementsheds tuples for more than a time period exceeding a threshold.

A stream operator or processing element may be configured to receivefirst and second tuples, respectively, via first and second links andoutput a third tuple after receipt of both tuples. In one embodiment, aninter-stream operator communication path may be identified as abottleneck if the time period between receipt of the first tuple and theoutput of the third tuple is outside of a threshold. For example, PE24may be configured to combine first, second, and third tuplesrespectively received from PE21, PE22, and PE23. The first tuple mayarrive from PE21 at time zero, the second tuple may arrive from PE22 3ms later, but the third tuple may not arrive from PE23 until 100 msafter time zero. Accordingly, PE24 is not able to output of a fourthtuple until more than 100 ms after time zero. A threshold may be set at50 ms. The elapsed time between time zero and the output of the fourthtuple will be outside the threshold, indicating that link L7 or link L10may be a bottleneck.

In operation 809, an operator graph travel time, an average operatorgraph travel time, or other similar metric determined in a monitoringoperation may be compared with a processing time constraint. If operatorgraph travel time is outside of the processing time constraint, e.g.,travel time is greater than the time constraint, it may be inferred thatthe operator graph is unable to handle the specified workload in thetime allowed. On the other hand, if operator graph travel time is withinthe processing time constraint, e.g., travel time is less than the timeconstraint, it may be inferred that the operator graph is capable ofhandling the specified workload in the time allowed.

In operation 810, results of monitoring a simulation of a stream-basedcomputing application may be generated. The monitoring results that aregenerated in operation 810 may be rendered for viewing by a user in anyknown manner. The monitoring results that are generated in operation 810may be stored in a memory. Monitoring results may include an indicationof whether the operator graph is capable of handling the specifiedworkload in the time allowed. Monitoring results may includeinter-stream operator communication paths identified as bottlenecks. Theparticular simulation conditions specified in operation 804 may berendered together with the monitoring results for the simulation.Multiple simulations may be performed and the monitoring resultsgenerated in operation 810 may include combining the results of themultiple simulations.

In operation 812, it may be determined whether an additional simulationof a stream-based computing application is to be performed. Typically,multiple additional simulations are performed, each simulation beingperformed under a different set of conditions. The various conditionsmay be simulated in a systematic manner. For example, one or moresimulations may be performed in which the manner in which streamoperators and processing elements simulate processing is varied. One ormore simulations may be performed in which the rate at which test tuplesare input to the stream-based application is varied. One or moresimulations may be performed in which the attributes of the test tuplesare varied. One or more simulations may be performed in which particularparts of the operator graph are either on or off during simulatedprocessing. One or more simulations may be performed in which operatorsor processing elements perform operations that may affect a network. Oneor more simulations may be performed in which other pertinent parametersare varied. If additional simulations are to be performed, the method800 moves to operation 804, where a set of conditions for the nextsimulation are specified. Otherwise, the method stops at 814.

FIG. 9 illustrates an exemplary flowchart of one method 900 forselecting an operator graph configuration for a stream-based computingapplication according to various embodiments. In operation 902, themonitoring results for one or more simulations may be sorted based on afirst performance metric. In one embodiment, each simulation isperformed using different simulation conditions and the monitoringresults include an indication of processing time, such as a path orgraph travel time. In one embodiment, the simulations may be sortedbased on a first performance metric, such as processing time. Inalternative embodiments, the simulations may be sorted according toanother metric, such as network resources or the number or type computenodes deployed in an operator graph. Sorting may identify a simulationhaving a first rank, i.e., the performance metric on which the sort wasbased is higher or lower than other simulations. In operation 904, aperformance metric for the simulation with the first rank may becompared with a processing constraint, i.e., a simulation having theshortest processing time, using the fewest resources, and the like. Inone embodiment, the processing constraint may be processing timeconstraint. For example, the processing time for a first rankedsimulation (one having a processing time shorter than processing timesof other simulations) may be compared with a processing time constraint.If the performance metric for the simulated processing having the firstrank is within a processing constraint, an operator graph configurationassociated with the simulation may be selected. For instance, if theprocessing time for the first ranked simulation is less than theprocessing time constraint, the operator graph configuration associatedwith the simulation may be selected for use in a production environment(operation 906). On the other hand, if the performance metric for thefirst ranked simulated processing is outside of the processingconstraint, the operator graph configuration associated with thesimulation is not selected for use in a production environment. That is,if the processing time for the first ranked simulation is less than theprocessing time constraint, it may be inferred that none of thesimulations satisfies the processing time constraint and additionalsimulations may be performed in operation 908. The additionalsimulations may be performed in operation 908 in order to determine anoperator graph configuration that will meet the processing timeconstraint.

In the foregoing, embodiments were described in which stream operatorsor processing elements of a stream-based application do not processtuples, but rather simulate the processing of tuples in order toidentify the network effects on the streaming application. It should beunderstood, however, that in other embodiments the stream operators orprocessing elements may process tuples during a simulation to identifynetwork effects.

In the foregoing, reference is made to various embodiments. It should beunderstood, however, that this disclosure is not limited to thespecifically described embodiments. Instead, any combination of thedescribed features and elements, whether related to differentembodiments or not, is contemplated to implement and practice thisdisclosure. Furthermore, although embodiments of this disclosure mayachieve advantages over other possible solutions or over the prior art,whether or not a particular advantage is achieved by a given embodimentis not limiting of this disclosure. Thus, the described aspects,features, embodiments, and advantages are merely illustrative and arenot considered elements or limitations of the appended claims exceptwhere explicitly recited in a claim(s).

As will be appreciated by one skilled in the art, aspects of the presentdisclosure may be embodied as a system, method, or computer programproduct. Accordingly, aspects of the present disclosure may take theform of an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.), or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module,” or “system.”Furthermore, aspects of the present disclosure may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination thereof. More specificexamples (a non-exhaustive list) of the computer readable storage mediumwould include the following: an electrical connection having one or morewires, a portable computer diskette, a hard disk, a random access memory(RAM), a read-only memory (ROM), an erasable programmable read-onlymemory (EPROM or Flash memory), an optical fiber, a portable compactdisc read-only memory (CD-ROM), an optical storage device, a magneticstorage device, or any suitable combination thereof. In the context ofthis disclosure, a computer readable storage medium may be any tangiblemedium that can contain, or store, a program for use by or in connectionwith an instruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wire line, optical fiber cable, RF, etc., or any suitable combinationthereof.

Computer program code for carrying out operations for aspects of thepresent disclosure may be written in any combination of one or moreprogramming languages, including: (a) an object oriented programminglanguage such as Java, Smalltalk, C++, or the like; (b) conventionalprocedural programming languages, such as the “C” programming languageor similar programming languages; and (c) a streams programminglanguage, such as IBM Streams Processing Language (SPL). The programcode may execute as specifically described herein. In addition, theprogram code may execute entirely on the user's computer, partly on theuser's computer, as a stand-alone software package, partly on the user'scomputer and partly on a remote computer, or entirely on the remotecomputer or server. In the latter scenario, the remote computer may beconnected to the user's computer through any type of network, includinga local area network (LAN) or a wide area network (WAN), or theconnection may be made to an external computer (for example, through theInternet using an Internet Service Provider).

Aspects of the present disclosure have been described with reference toflowchart illustrations, block diagrams, or both, of methods,apparatuses (systems), and computer program products according toembodiments of this disclosure. It will be understood that each block ofthe flowchart illustrations or block diagrams, and combinations ofblocks in the flowchart illustrations or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing the functionsor acts specified in the flowchart or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function or act specified in the flowchart or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus, or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions or acts specified in the flowchart or blockdiagram block or blocks.

Embodiments according to this disclosure may be provided to end-usersthrough a cloud-computing infrastructure. Cloud computing generallyrefers to the provision of scalable computing resources as a serviceover a network. More formally, cloud computing may be defined as acomputing capability that provides an abstraction between the computingresource and its underlying technical architecture (e.g., servers,storage, networks), enabling convenient, ondemand network access to ashared pool of configurable computing resources that can be rapidlyprovisioned and released with minimal management effort or serviceprovider interaction. Thus, cloud computing allows a user to accessvirtual computing resources (e.g., storage, data, applications, and evencomplete virtualized computing systems) in “the cloud,” without regardfor the underlying physical systems (or locations of those systems) usedto provide the computing resources.

Typically, cloud-computing resources are provided to a user on apay-per-use basis, where users are charged only for the computingresources actually used (e.g., an amount of storage space used by a useror a number of virtualized systems instantiated by the user). A user canaccess any of the resources that reside in the cloud at any time, andfrom anywhere across the Internet. In context of the present disclosure,a user may access applications or related data available in the cloud.For example, the nodes used to create a stream computing application maybe virtual machines hosted by a cloud service provider. Doing so allowsa user to access this information from any computing system attached toa network connected to the cloud (e.g., the Internet).

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams or flowchart illustration, andcombinations of blocks in the block diagrams or flowchart illustration,can be implemented by special purpose hardware-based systems thatperform the specified functions or acts, or combinations of specialpurpose hardware and computer instructions.

Although embodiments are described within the context of a streamcomputing application, this is not the only context relevant to thepresent disclosure. Instead, such a description is without limitationand is for illustrative purposes only. Additional embodiments may beconfigured to operate with any computer system or application capable ofperforming the functions described herein. For example, embodiments maybe configured to operate in a clustered environment with a standarddatabase processing application. A multi-nodal environment may operatein a manner that effectively processes a stream of tuples. For example,some embodiments may include a large database system, and a query of thedatabase system may return results in a manner similar to a stream ofdata.

While the foregoing is directed to exemplary embodiments, other andfurther embodiments of the disclosure may be devised without departingfrom the basic scope thereof, and the scope thereof is determined by theclaims that follow.

What is claimed is:
 1. A method for selecting an operator graphconfiguration for a stream-based computing application, comprising:performing a first simulated processing of the stream-based computingapplication using a first simulation condition, the first simulationcondition specifying a first operator graph configuration; performing asecond simulated processing of the stream-based computing applicationusing a second simulation condition, the second simulation conditionspecifying a second operator graph configuration, the second simulationcondition being distinct from the first simulation condition; eachsimulated processing including inputting a stream of test tuples to thestream-based computing application, the stream-based computingapplication operating on one or more compute nodes, each compute nodehaving one or more computer processors and a memory to store one or moreprocessing elements, each processing element having one or more streamoperators; monitoring each simulated processing to determine one or moreperformance metrics; sorting the first and second simulated processingsbased on a first performance metric to identify a simulated processinghaving a first rank; and selecting an operator graph configurationassociated with the simulated processing having the first rank if thefirst performance metric for the simulated processing having the firstrank is within a processing constraint.
 2. The method of claim 1,further comprising, if the first performance metric for the simulatedprocessing having the first rank is outside of the processingconstraint, performing a third simulated processing of the stream-basedcomputing application using a third simulation condition, the thirdsimulation condition specifying a third operator graph configuration andbeing distinct from the first and second simulation conditions.
 3. Themethod of claim 1, wherein the one or more performance metrics includesa processing time and the processing constraint is a processing timeconstraint.
 4. The method of claim 1, wherein the one or moreperformance metrics includes a path travel time and the processingconstraint is a path travel time constraint.
 6. The method of claim 1,wherein the first simulation condition includes deactivating one of thecompute nodes.
 7. The method of claim 1, wherein the first simulationcondition includes deactivating one of the stream operators.
 8. Themethod of claim 1, wherein the first simulation condition includesconfiguring a stream operator to initiate an extra stream-basedcomputing application communication.
 9. The method of claim 1, whereinthe first simulation condition includes configuring tuple routing at astream operator.
 10. The method of claim 1, wherein the first simulationcondition includes configuring a number of tuples output by a streamoperator in response to receiving an input tuple.
 11. The method ofclaim 1, wherein the first simulation condition includes configuring asize of a tuple output by a stream operator in response to receiving aninput tuple.
 12. The method of claim 1, wherein the first simulationcondition includes configuring a condition under which a stream operatorsheds tuples.
 13. The method of claim 1, wherein the first simulationcondition includes configuring a stream operator to group two or moretuples for transmission.
 14. A computer program product for selecting anoperator graph configuration for a stream-based computing application,the computer program product comprising a computer readable storagemedium having program code embodied therewith, the program codecomprising computer readable program code configured to: perform a firstsimulated processing of the stream-based computing application using afirst simulation condition, the first simulation condition specifying afirst operator graph configuration; perform a second simulatedprocessing of the stream-based computing application using a secondsimulation condition, the second simulation condition specifying asecond operator graph configuration, the second simulation conditionbeing distinct from the first simulation condition; each simulatedprocessing including inputting a stream of test tuples to thestream-based computing application, the stream-based computingapplication operating on one or more compute nodes, each compute nodehaving one or more computer processors and a memory to store one or moreprocessing elements, each processing element having one or more streamoperators; monitor each simulated processing to determine one or moreperformance metrics; sort the first and second simulated proces singsbased on a first performance metric to identify a simulated processinghaving a first rank; and select an operator graph configurationassociated with the simulated processing having the first rank if thefirst performance metric for the simulated processing having the firstrank is within a processing constraint.
 15. A stream-based computingsystem, comprising: one or more compute nodes, each compute node havingone or more computer processors and a memory to store one or moreprocessing elements, each processing element having one or more streamoperators, the compute nodes being configured to: perform a firstsimulated processing of the stream-based computing application using afirst simulation condition, the first simulation condition specifying afirst operator graph configuration; perform a second simulatedprocessing of the stream-based computing application using a secondsimulation condition, the second simulation condition specifying asecond operator graph configuration, the second simulation conditionbeing distinct from the first simulation condition; and a managementsystem operating on a compute node, the compute node having one or morecomputer processors and a memory to store an application verifier, theapplication verifier being configured to: monitor each simulatedprocessing to determine one or more performance metrics; sort the firstand second simulated processings based on a first performance metric toidentify a simulated processing having a first rank; and select anoperator graph configuration associated with the simulated processinghaving the first rank if the first performance metric for the simulatedprocessing having the first rank is within a processing constraint. 16.The stream-based computing system of claim 15, wherein, if the firstperformance metric for the simulated processing having the first rank isoutside of the processing constraint, the compute nodes are furtherconfigured to perform a third simulated processing of the stream-basedcomputing application using a third simulation condition, the thirdsimulation condition specifying a third operator graph configuration andbeing distinct from the first and second simulation conditions.
 17. Thestream-based computing system of claim 15, wherein the one or moreperformance metrics includes a processing time and the processingconstraint is a processing time constraint.
 18. The stream-basedcomputing system of claim 15, wherein the first simulation conditionincludes deactivating one of the compute nodes.
 19. The stream-basedcomputing system of claim 15, wherein the first simulation conditionincludes configuring a stream operator to initiate an extra stream-basedcomputing application communication.
 20. The stream-based computingsystem of claim 15, wherein the first simulation condition includesconfiguring a stream operator to group two or more tuples fortransmission.